﻿namespace Hotel.Module.Management
{
    using System;
    using Hotel.Module.Management.Models;
    using System.Collections.Generic;

    public interface IManagement:IDisposable
    {
        #region IManagement members
        /// <summary>
        /// Save changes made in repository
        /// </summary>
        void SaveChanges();     

        #endregion
        #region For Orders

        /// <summary>
        /// Get all orders
        /// </summary>
        /// <returns>List of Orders</returns>
        List<Order> GetOrders();

        /// <summary>
        /// Gets Order from Repository by ID
        /// </summary>
        /// <param name="ID">ID of Order</param>
        /// <returns>Order if found</returns>
        Order GetOrderByID(int ID);

        /// <summary>
        /// Get number for new order
        /// </summary>
        /// <returns>New ordinal number</returns>
        int GetNewOrderNumber();
        /// <summary>
        /// Get which order is current belongs to
        /// </summary>
        /// <param name="CurrentRoomNumber">Current room number</param>
        /// <returns>Order ID</returns>
        int GetOrderIDByRoomNumber(int CurrentRoomNumber);  

      
        #endregion
        #region For Assignments

        /// <summary>
        /// Create new assignment in base
        /// </summary>
        /// <param name="initAssignment">Assignment to add</param>
        /// <returns>Assignment ID</returns>
       int CreateAssignment(Assignment initAssignment);
        /// <summary>
        /// Get assignments for staff
        /// </summary>
        /// <param name="InitWorkerType">Staff specialization</param>
        /// <returns>List of assignments</returns>
       List<Assignment> GetAssignmentsToDo(string InitWorkerType);
        /// <summary>
        /// Take an assignment to perform 
        /// </summary>
        /// <param name="InitialAssignment">Needed assignment</param>
       void ApplyAssignment(Assignment InitialAssignment);
        /// <summary>
        /// On work done finish assignment
        /// </summary>
        /// <param name="InitialAssignment">Finished assignment</param>
        void FinishAssignment(Assignment InitialAssignment);

        /// <summary>
        /// Get assignments taken by initial worker
        /// </summary>
        /// <param name="NeededWorker">Worker login</param>
        /// <returns></returns>
        List<Assignment> GetCurrentAssignments(string NeededWorker);
        #endregion       
    }
}
